<!--
 * @Date: 2025-07-22 22:15:33
 * @LastEditors: 贾二小 erxiao.jia@outlook.com
 * @LastEditTime: 2025-08-27 22:22:40
 * @FilePath: /admin-vue/src/layouts/modules/global-logo/index.vue
-->
<script setup lang="ts">
import { RouteEnum } from '@/enums/RouteEnum'
import { $t } from '@/locales'

defineOptions({
  name: 'GlobalLogo',
})

interface Props {
  /** Whether to show the title */
  showTitle?: boolean
}

withDefaults(defineProps<Props>(), {
  showTitle: true,
})
</script>

<template>
  <RouterLink
    :to="{ name: RouteEnum.HOME }"
    class="w-full flex items-center justify-center overflow-hidden"
  >
    <SystemLogo class="text-3xl text-primary" />
    <h2
      v-show="showTitle"
      class="pl-2 text-base text-primary font-bold whitespace-nowrap duration-300 ease-in-out"
    >
      {{ $t('system.title') }}
    </h2>
  </RouterLink>
</template>

<style scoped></style>
